package com.polaris.live.utils.zego.core

import im.zego.realtimetranslation.ZegoRealtimeTranslation

/**
 * TranslationHandler
 *
 * @author Created by lucas on 2023/11/25 19:42
 */
class TranslationHandler {

    private val engine: ZegoRealtimeTranslation = ZegoRealtimeTranslation.getInstance()

    /**
     * 初始化
     */
    fun init(key: String) {
        engine.init(key)
    }

    /**
     * 断开连接
     */
    fun disconnect() {
        //这里的调用正常情况下是无意义的
        engine.stopRealtimeTranslation()
    }

    /**
     * 获取引擎
     */
    fun getEngine(): ZegoRealtimeTranslation {
        return engine
    }
}